#!/usr/bin/env python

import re, sys

text = ''.join([line.rstrip() for line in sys.stdin])
list = re.findall('[^A-Z][A-Z][A-Z][A-Z]([a-z])[A-Z][A-Z][A-Z][^A-Z]', text)
print ''.join(list)
